<include file="Common:header"/>
<body>
	<div class="top-wrap" style="padding-top: 15px; padding-bottom:15px;">
		<div class="title-bg">提现申请</div>
	</div>
	<div class="main-wrap" style="padding-top:10px;">
		<div style="margin-bottom: 15px;">
			<a class="withdraw-btn" href="<{:U('Home/User/bank_withdraw')}>" style="margin-left:10px;" >银行卡提现</a>
			<a class="withdraw-btn" href="<{:U('Home/User/alipay_withdraw')}>" style="margin-right:10px; float:right;" >支付宝提现</a>
			<div class="clear"></div>
		</div>
		<div class="nodata-box" style="color:#666;" >
			提示:7个工作日内到账,周末节假日不提现
		</div>

		<div style=" border-left: 8px solid #4084bb; margin:15px 0 0;">
			<div style="border:1px solid #ccc; border-left:0; height: 36px; line-height: 36px; padding:0 10px; ">提现记录</div>
		</div>
		<div style="padding: 5px; border:1px solid #ccc; border-top:0;">
			<if condition="!empty($list)">
				<foreach name="list" item="value">
					<div class="withdraw-log">
						<p><{$value['content']}></p>
						<p style="text-align:right; color:#b3b3b3; font-size:12px;"><{$value['createtime_str']}></p>
					</div>
				</foreach>
			<else/>
				<font color="#666">暂无提现记录</font>
			</if>
			<div id="loadding" style="text-align: center; display: none;"><img src="__PUBLIC__/js/layer/skin/default/loading-0.gif" /></div>
			<input type="hidden" id="page" value="1">
		</div>
	</div>
		
	<include file="Common:menu"/>
	
</body>
</html>
<script>
$(function(){
	$(window).scroll(function () {
		if($(window).scrollTop()>=($(document).height()-$(window).height())){
			ajax_article();
		}
	});
});

//加载文章
function ajax_article(){
	var loadObj = $('#loadding');
	var page = $('#page').val();
	if(page == '-1'){
		return false;
	}
	loadObj.show();
	$.ajax({
		type: "POST",
		url: "<{:U('Home/User/withdraw')}>",
		data: "page="+page,
		dataType:'json',
		success: function(msg){
			if(msg.status == '1'){
				var html = '';
				for(var i  in  msg.data){
					html += '<div class="withdraw-log">';
					html += '<p>'+msg.data[i].content+'</p>';
					html += '<p class="withdraw-time">'+msg.data[i].createtime_str+'</p>';
					html += '</div>';
				}
				page = parseInt(page) + 1;
				$('#page').val(page);
				$('#loadding').before(html);
				loadObj.hide();
			}else{
				$('#page').val('-1');
				loadObj.hide();
			}
		}
	});
}

</script>